package com.mercury.chatgpt.controller;

import com.mercury.chatgpt.service.ChatgptService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author mercury
 * @date 2023/4/13 13:26
 */
@RestController
public class ChatgptController {


    @Resource
    private ChatgptService chatgptService;


    @GetMapping("/send")
    public String sendMessage(@RequestParam("message") String message) {
        return chatgptService.sendMessage(message);
    }
}
